<template>
  <el-card :bordered="false" class="storeOrderDetails">
    <el-page-header @back="$router.go(-1)" style="margin-bottom:10px"></el-page-header>
    <el-form
      :model="ruleForm"
      :rules="rules"
      ref="ruleForm"
      :labelWidth="labelWidth"
      class="demo-ruleForm"
    >
      <el-card
        class="box-card"
        shadow="never"
        style="margin: 20px 0;background-color:rgba(215, 215, 215, 0.5);"
      >
        <div slot="header" class="clearfix">
          <h3 class="header_title" v-if="this.$route.query.status == '00'">待配单</h3>
          <h3 class="header_title" v-if="this.$route.query.status == '01'">待配送</h3>
          <h3 class="header_title" v-if="this.$route.query.status == '02'">已完成</h3>
          <h3 class="header_title" v-if="this.$route.query.status == '03'">已取消</h3>
        </div>
        <el-row :gutter="10">
          <el-col :xs="8" :md="8">
            <el-form-item label="门店采购单号：">{{shopShopPurchaseInfoDto.purchaseInfoId}}</el-form-item>
          </el-col>
          <el-col :xs="8" :md="8">
            <el-form-item label="创单人：">{{shopShopPurchaseInfoDto.operatorId}}</el-form-item>
          </el-col>
          <el-col :xs="8" :md="8">
            <el-form-item label="制单时间：">{{shopShopPurchaseInfoDto.createTime}}</el-form-item>
          </el-col>
        </el-row>
      </el-card>
      <!-- 门店采购信息 -->
      <el-card class="box-card" shadow="never" style="margin-bottom: 20px;">
        <div slot="header" class="clearfix">
          <h3>门店采购信息</h3>
        </div>
        <el-row :gutter="10">
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">门店名称：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.shopName}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">联系人：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.personName}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">联系手机号：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.phoneNum}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">门店地址：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.shopAdress}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">预计送达日期：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.serviceDate}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">备注：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.remarks}}</span>
          </el-col>
        </el-row>
        <buyingIfor
          ref="buyingIfor"
          style="margin:10px 0px 10px 10px"
          :loadData="shopShopPurchaseGoodsDto"
          :price="price"
        />
      </el-card>

      <!-- 配送明细 -->
      <el-card class="box-card" shadow="never" style="margin-bottom: 20px;">
        <div slot="header" class="clearfix">
          <h3>配送明细</h3>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">总仓调拨</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">总仓出库单：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.outStockId}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">门店入库单：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.inStockId}}</span>
          </el-col>
        </div>
        <el-row :gutter="10">
          <!-- <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">出库方：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.companyName}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">联系人：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.contacts}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">联系电话：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.contactsNum}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">地址：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.companyAdress}}</span>
          </el-col> -->
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">出库状态：</span>
            <span
              class="dingdanInfo_span_value"
            >{{shopShopPurchaseInfoDto.outStockStatus | outStockStatus}}</span>
          </el-col>
          <el-col :xs="8" :md="8">
            <span class="dingdanInfo_span">出库时间：</span>
            <span class="dingdanInfo_span_value">{{shopShopPurchaseInfoDto.outStockTime}}</span>
          </el-col>
        </el-row>
      </el-card>
      <div class="content">
        <!-- <el-button @click="save('ruleForm')" type="primary">保存</el-button> -->
        <a-button @click="quxiao('ruleForm')">返 回</a-button>
      </div>
    </el-form>
  </el-card>
</template>

<script src='./index.js'></script>

<style lang="less">
.storeOrderDetails {
  .content {
    text-align: center;
    margin: 20px 0px;
    button {
      margin-right: 10px;
    }
  }
  .mdweizhi {
    display: flex;
    .jwd {
      span {
        padding-right: 10px;
      }
      .el-form-item__label {
        text-align: right;
        width: 50px !important;
      }
      .el-form-item__content {
        margin-left: 0px !important;
        margin-right: 20px;
      }
    }
  }
  .box-card {
    .header_title {
      background: rgba(102, 204, 102, 1);
      display: inline-block;
      padding: 5px 10px;
      color: #fff;
    }
    .title {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    // h3 {
    //   margin: 0;
    // }
  }
  .dingdanInfo {
    .dingdanInfo_span {
      display: inline-block;
      width: 120px;
      font-size: 16px;
    }
  }
}
</style>
